package cn.iocoder.yudao.module.erp.controller.admin.saleorder.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false)
public class SaleOrderImportExcelVO {

    @ExcelProperty("销售单号")
    private String billNo;

    @ExcelProperty("*销售日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime billDate;

    @ExcelProperty("*客户")
    private String customerName;

    @ExcelProperty("*仓库名称")
    private String warehouseName;

    @ExcelProperty("联系人")
    private String customerContacterName;

    @ExcelProperty("联系电话")
    private String customerMobile;

    @ExcelProperty("*物品编号")
    private String code;

    @ExcelProperty("*数量")
    private BigDecimal number;

    @ExcelProperty("*单价")
    private BigDecimal price;

    @ExcelProperty("*税率")
    private BigDecimal taxRate;

    @ExcelProperty("单位成本")
    private BigDecimal unitCost;

    @ExcelProperty("出库数量")
    private BigDecimal outNum;

    @ExcelProperty("退库数量")
    private BigDecimal inNum;

    @ExcelProperty("未出库数量")
    private BigDecimal noOutNum;

    @ExcelProperty("计划生产数量")
    private BigDecimal planNum;

    @ExcelProperty("排产数量")
    private BigDecimal workNum;

    @ExcelProperty("*优惠金额")
    private BigDecimal discountAmount;

    @ExcelProperty("物品备注")
    private String goodRemarks;

    @ExcelProperty("交付日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime deliveryData;

    @ExcelProperty("交付地址")
    private String deliveryAddress;

    @ExcelProperty("项目名称")
    private String projectName;

    @ExcelProperty("客户订单号")
    private String customerOrderNo;

    @ExcelProperty("销售方")
    private String billContacter;

    @ExcelProperty("销售员")
    private String billContacterName;

    @ExcelProperty("结算方式")
    private String settlementName;

    @ExcelProperty("备注")
    private String remarks;

//    @ExcelProperty(value = "是否采购",converter = DictConvert.class)
    @ExcelProperty(value = "是否采购")
//    @DictFormat(DictTypeConstants.ERP_PURCHSE_TYPE)
    private Boolean syncPurchase;

//    @ExcelProperty(value = "是否收款",converter = DictConvert.class)
//    @DictFormat(DictTypeConstants.ERP_COLLECTION_TYPE)
    @ExcelProperty(value = "是否收款")
    private Boolean syncPay;

//    @ExcelProperty(value = "是否出库",converter = DictConvert.class)
//    @DictFormat(DictTypeConstants.ERP_OUTBOUND_TYPE)
    @ExcelProperty(value = "是否出库")
    private Boolean syncOut;

//    @ExcelProperty(value = "是否开票", converter = DictConvert.class)
//    @DictFormat(DictTypeConstants.ERP_INVOICING_TYPE)
    @ExcelProperty(value = "是否开票")
    private Boolean syncInvoice;

    @ExcelProperty("类型")
    private int type;

    @ExcelProperty("过期时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime expireTime;


}
